
#ifndef	__UR_ANALYSE_H
#define	__UR_ANALYSE_H


typedef enum{
    UR_WAIT_HEAD,
    UR_NEXT_HEAD,
    UR_PAYLOAD_DATA,
    UR_JUDGE_SECOND_END_FLAG,
    UR_SUCCESS,
    UR_ERROR
}UR_GET_MAIN_STT_E;


#define UR_FIRST_END_FLAG		'Y'//'\r'
#define UR_SECOND_END_FLAG		'Z'//'\n'

#define UR_MAX_AT_CMD_SIZE	(20)



#define QUOTA_CONSUME_RECEIVE_U2_TIMEOUT	 	20
#define QUOTA_CONSUME_DISPLAY_BALANCE_TIMER 	QUOTA_CONSUME_RECEIVE_U2_TIMEOUT + 2
#define QUOTA_CONSUME_FINISH_TIMER 				QUOTA_CONSUME_DISPLAY_BALANCE_TIMER + 2

extern u8 display_balance_timer;
extern u8 beep_timer;
extern u8 failure_beep_answer_timer;
extern u8 failure_consume_timer;
extern u8 receive_u2_timeout;
extern u8 idata quota_consume_finish_timer;

extern bit failure_consume_display;
extern bit consume_mark;
extern bit ban_incident;
extern bit consumption_succeed_trigger_key;
extern bit display_reset_mark;
extern bit enabled_next_consumption;
extern bit consume_judge;


extern void ur_analyse_init(void);

extern void ur_analyse_data(void);

extern void ur_parse_hook_func(u8 *frame);

extern void ur_ban_failure(void);

extern void ur_heavy_brush_init(void);


#endif

